
clear

**************************************************************
********* replication data for Benegal & Holman 
********* 

set more off 
set scheme plotplain

**** set working directory here **** 

use  "anes_clean.dta" 
cd "C:\Users\HolmanMirya\Dropbox (MH)\Benegal_Holman_Beatty\hostile sexism\figures\new"


gen pid2 = .
replace pid2 = 0 if Republican == 1
replace pid2 = 1 if Democrat == 1
label variable pid2 "Party ID"
label define pid2 0 "Republican" 1 "Democrat" 

label variable white2 "Race: White" 
label variable income1 "Income" 

rename hostilesexism hostilesexism2

foreach var in hostilesexism2 {
		qui sum `var'
		gen hostilesexism = (`var' - `r(min)') / (`r(max)'-`r(min)')
		}
label var hostilesexism "Hostile sexism" 
 
egen sexism_all = rowmean (hostilesexism modernsexism) 
label var sexism_all "Combined hostile & modern sexism" 

**** RWA scale **** 

gen free_think = .
replace free_think = 1 if V162168 == 1
replace free_think = 2 if V162168 == 2
replace free_think = 3 if V162168 == 3
replace free_think = 4 if V162168 == 4
replace free_think = 5 if V162168 == 5

gen rotten=.
replace rotten=1 if V162169==5
replace rotten=2 if V162169==4
replace rotten=3 if V162169==3
replace rotten=4 if V162169==2
replace rotten=5 if V162169==1


gen strong=.
replace strong=1 if V162170==5
replace strong=2 if V162170==4
replace strong=3 if V162170==3
replace strong=4 if V162170==2
replace strong=5 if V162170==1

egen rwa = rowmean(free_think rotten strong) 
replace rwa = rwa/5

label var rwa "Right wing authoritarianism" 

global controls Male Democrat Republican Liberal Conservative white income1 b1.educlevel b1.agecat5
global controls2 Male Democrat Republican Liberal Conservative white income1 b1.educlevel b1.agecat4 
global controls3 Male Democrat Republican Liberal Conservative white income1 b1.educcat2 b1.agecat4 
global controls4 Liberal Conservative white income b1.educlevel b1.agecat5
global controls5 resentment Male Democrat Republican Liberal Conservative white income1 b1.educlevel b1.agecat5


**** basic results ***** 

eststo clear
eststo cc_happening: logit gwhapp hostilesexism  $controls   [pweight=V160101]
eststo cc_happening2: logit gwhapp modernsexism  $controls   [pweight=V160101]

eststo cc_humancaused: logit human hostilesexism  $controls  [pweight=V160101]
eststo cc_humancaused2: logit human modernsexism  $controls  [pweight=V160101]



# delimit ;
esttab using 1_anes2016.rtf, nogap se b b(%9.3f) starlevels(* .05) pr2(%9.3f) 
	title("Sexism and climate change views (ANES 2016)" )
	  label nonumbers mtitles("Happening" "Happening" "Human caused" "Human caused")
	addnote("Logistic regression. 2016 American National Elections Study data with errors clustered on survey")
	compress replace;
 #delimit cr
 
 
***** graph **** 


eststo clear
logit gwhapp hostilesexism  $controls   [pweight=V160101]
	margins, at(hostilesexism=(0(.125)1))    atmeans post 
	estimates store happening_hostile
	
logit gwhapp modernsexism  $controls   [pweight=V160101]
	margins, at(modernsexism=(0(.125)1))    atmeans post 
	estimates store happening_modern 
	
logit human hostilesexism  $controls  [pweight=V160101]
	margins, at(hostilesexism=(0(.125)1))    atmeans post 
	estimates store human_hostile 
	
logit human modernsexism  $controls  [pweight=V160101]
	margins, at(modernsexism=(0(.125)1))    atmeans post 
	estimates store human_modern 
	
coefplot (happening_hostile, label (Hostile Sexism) ) (happening_modern, label (Modern sexism) ), bylabel(Global warming is happening) ///
	|| (human_hostile) (human_modern), bylabel (Global Warming is caused by humans) ///
	ytitle ("% Agreeing")   title("") legend (rows(1) pos(6)) ///
	xlab(0 "Low" .5 "Medium" 1 "High" , labsize(small)) xtitle ("") ///
	ylab(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(small)) ///
	at recast(line) lwidth(*2) ciopts(recast(rline) lc(gray) lp(-) lw(vthin)) 
	graph save "f1_anes_allbelief2.gph", replace
	graph export "f1_anes_allbelief2.pdf", replace 

**** looking at levels of sexism across groups **** 
 eststo clear 

eststo women: quietly estpost summarize ///
    hostilesexism modernsexism if Male == 0
eststo men: quietly estpost summarize ///
    hostilesexism modernsexism if Male == 1
eststo dem: quietly estpost summarize ///
    hostilesexism modernsexism if Democrat == 1
eststo rep: quietly estpost summarize ///
    hostilesexism modernsexism if Republican == 1
eststo lib: quietly estpost summarize ///
    hostilesexism modernsexism if Liberal == 1
eststo conserve: quietly estpost summarize ///
    hostilesexism modernsexism if Conservative == 1
eststo dem: quietly estpost summarize ///
    hostilesexism modernsexism if white == 1
eststo income1: quietly estpost summarize ///
    hostilesexism modernsexism if income1 >= 11
eststo income5: quietly estpost summarize ///
    hostilesexism modernsexism if income1 <= 5
eststo educlevel1: quietly estpost summarize ///
    hostilesexism modernsexism if educlevel == 1
eststo educlevel4: quietly estpost summarize ///
    hostilesexism modernsexism if educlevel >= 4
eststo agecat1: quietly estpost summarize ///
    hostilesexism modernsexism if agecat4 == 1
eststo agecat4: quietly estpost summarize ///
    hostilesexism modernsexism if agecat4 == 4

esttab women men agecat1 agecat4, ///
cells("mean(pattern(1 1 1 1) fmt(2))") ///
label
		
esttab dem rep lib conserve, ///
cells("mean(pattern(1 1 1 1) fmt(2))") ///
label
	
		
esttab  income1 income5 educlevel1 educlevel4, ///
cells("mean(pattern(1 1 1 1) fmt(2))") ///
label
	
	
***** by pid **** 


eststo clear
eststo human_hostile_dem: logit human hostilefactor  $controls if Democrat == 1  [pweight=V160101]
eststo human_hostile_rep: logit human hostilefactor  $controls if Republican == 1  [pweight=V160101]
eststo human_modern_dem: logit human modernsexism  $controls if Democrat == 1  [pweight=V160101]
eststo human_modern_rep: logit human modernsexism  $controls if Republican == 1  [pweight=V160101]


	
		# delimit ;
		esttab 	using 3_anes_pid.rtf, nogap se b(%9.3f) starlevels(* .05) pr2(%9.3f) ///
			title("ANES 2016: Party Identification, Sexism, and Climate Change")
			mtitle("Dems" "Reps" "Dems" "Reps") 
			 label nonumbers
			//addnote("Dependent variable")//
			compress replace;
		#delimit cr


eststo clear
logit human hostilefactor  $controls if Democrat == 1  [pweight=V160101]
	margins, at(hostilefactor=(0(.125)1))   atmeans post 
	estimates store human_dems

logit human hostilefactor  $controls if Republican == 1  [pweight=V160101]
	margins, at(hostilefactor=(0(.125)1))   atmeans post 
	estimates store human_rep
	
		
	
coefplot (human_dems, label (Democrats) ) (human_rep, label (Republicans) ), bylabel(Hostile sexism (ANES 2016)) ///
	ytitle ("% Agreeing") ///
	xlab(0 "Low" .5 "Medium" 1 "High" , labsize(small)) xtitle ("Hostile sexism (ANES 2016)") ///
	title ("Global Warming is Human Caused") ///
	ylab(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(vsmall)) ///
	at recast(line) lwidth(*2) ciopts(recast(rline) lc(gray) lp(-) lw(vthin)) ///
	legend (col(2) pos(6)) 
	graph save "human_pid_hostile.gph", replace
	graph export "human_pid_hostile.pdf", replace 
	
	

eststo clear
logit human modernsexism  $controls if Democrat == 1  [pweight=V160101]
	margins, at(modernsexism=(0(.125)1))   atmeans post 
	estimates store human_dems2

logit human modernsexism  $controls if Republican == 1  [pweight=V160101]
	margins, at(modernsexism=(0(.125)1))   atmeans post 
	estimates store human_rep2
	
		
	
coefplot (human_dems2, label (Democrats) ) (human_rep2, label (Republicans) ), bylabel(Modern sexism (ANES 2016)) ///
	ytitle ("% Agreeing") ///
	xlab(0 "Low" .5 "Medium" 1 "High" , labsize(small)) xtitle ("Modern sexism (ANES 2016)") ///
	title ("Global Warming is Human Caused") ///
	ylab(0 "0%" .25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(vsmall)) ///
	at recast(line) lwidth(*2) ciopts(recast(rline) lc(gray) lp(-) lw(vthin)) ///
	legend (col(2) pos(6)) 
	graph save "human_pid_modern.gph", replace
	graph export "human_pid_modern.pdf", replace 

	
	*** PID for appendix **** 
	
eststo clear
		
eststo dem_hostile: logit human c.hostilefactor##i.pid2  $controls    [pweight=V160101]
eststo dem_modern: logit human c.modernsexism##i.pid2   $controls  [pweight=V160101]

	
		# delimit ;
		esttab 	using a3_append_pid.rtf, nogap se b(%9.3f) starlevels(* .05) pr2(%9.3f) ///
			title("ANES 2016: Party Identification, Sexism, and Climate Change")
			 label nonumbers
			//addnote("Dependent variable")//
			compress replace;
		#delimit cr

	
		***** post hoc tests ***** 
		
eststo clear 
		
logit human hostilefactor  $controls if Democrat == 1 
	estimates store human_dems2

logit human hostilefactor  $controls if Republican == 1  
	estimates store human_rep2
		
	suest human_dems2 human_rep2
	test [human_dems2_humanactivity ]hostilefactor=[human_rep2_humanactivity ]hostilefactor, accum		
	

	***** estimating subgroup effects ***** 
	
	
	eststo clear 
	
	**** by gender **** 
	
	logit human hostilefactor  $controls if Male ==1  [pweight=V160101]
	margins, at(hostilefactor=(0(.125)1))   atmeans post 
	estimates store human_men

 logit human hostilefactor  $controls  if Male ==0 [pweight=V160101]
	margins, at(hostilefactor=(0(.125)1))   atmeans post 
	estimates store human_wom

logit human modernsexism  $controls   if Male == 1 [pweight=V160101]
	margins, at(modernsexism=(0(.125)1))   atmeans post 
	estimates store human_menb

logit human modernsexism  $controls  if Male == 0  [pweight=V160101]
	margins, at(modernsexism=(0(.125)1))   atmeans post 
	estimates store human_womb
	
		
	**** ideology ***** 

	
logit human hostilefactor  $controls if Liberal==1  [pweight=V160101]
	margins, at(hostilefactor=(0(.125)1))   atmeans post 
	estimates store human_lib
logit human hostilefactor  $controls   if Conservative ==1  [pweight=V160101]
	margins, at(hostilefactor=(0(.125)1))   atmeans post 
	estimates store human_cons
	
logit human modernsexism  $controls if Liberal==1  [pweight=V160101]
	margins, at(modernsexism=(0(.125)1))   atmeans post 
	estimates store human_libb
logit human modernsexism  $controls   if Conservative ==1  [pweight=V160101]
	margins, at(modernsexism=(0(.125)1))   atmeans post 
	estimates store human_consb
	
	
	
	**** age ***** 
logit human hostilefactor  $controls2  if agecat4==1 [pweight=V160101]
	margins, at(hostilefactor=(0(.125)1))   atmeans post 
	estimates store human_age1
 logit human hostilefactor  $controls2 if agecat4==4  [pweight=V160101]
	margins, at(hostilefactor=(0(.125)1))   atmeans post 
	estimates store human_age2
logit human modernsexism  $controls2  if agecat4==1 [pweight=V160101]
	margins, at(modernsexism=(0(.125)1))   atmeans post 
	estimates store human_age1b
 logit human modernsexism  $controls2 if agecat4==4  [pweight=V160101]
	margins, at(modernsexism=(0(.125)1))  atmeans post 
	estimates store human_age2b

		
	**** education ***** 
		
logit human hostilefactor  $controls3  if educcat2==1 [pweight=V160101]
	margins, at(hostilefactor=(0(.125)1) )   atmeans post 
	estimates store human_edu1
logit human hostilefactor  $controls3 if educcat2==3  [pweight=V160101]
	margins, at(hostilefactor=(0(.125)1) )   atmeans post 
	estimates store human_edu2
	

logit human modernsexism  $controls3  if educcat2==1 [pweight=V160101]
	margins, at(modernsexism=(0(.125)1) )   atmeans post 
	estimates store human_edu1b
logit human modernsexism  $controls3 if educcat2==3  [pweight=V160101]
	margins, at(modernsexism=(0(.125)1) )   atmeans post 
	estimates store human_edu2b
	

***** combined demographic graph 
	
coefplot (human_wom, label (Hostile Sexism)) (human_womb, label (Modern sexism) ), bylabel(Gender: Women) ///
	|| (human_men) (human_menb), bylabel (Gender: Men) ///
	|| (human_lib) (human_libb ), bylabel(Ideology: Liberals) ///
	|| (human_cons) (human_consb), bylabel (Ideology: Conservatives) ///	
	|| (human_age1) (human_age1b ), bylabel(Age: Under 35) ///"figures\policy_pid_v2b.gph",
	|| (human_age2) (human_age2b), bylabel (Age: 65 or older) ///	
	|| (human_edu1 ) (human_edu1b ), bylabel(Edu: High school or less) ///
	|| (human_edu2) (human_edu2b), bylabel (Edu: BA+) ///	
	ytitle ("")    ///
	headings(,labsize(vsmall)) ///
	xlab(0 "Low" .5 "Medium" 1 "High" , labsize(small)) title ("") ///
	byopts(col(2)) ///
	ylab(0 "0%" .25 "25%" .5 "50%" .75 "75%", labsize(small)) ///
	legend (rows(1)) ///
	graphregion(margin(none)) xsize(7) ysize(9)  ///
	at recast(line) lwidth(*2) ciopts(recast(rline) lc(gray) lp(-) lw(vthin)) 
	graph save "f3_anes2016_demographics_sep.gph", replace
	graph export "f_3anes2016_demographics_sep.pdf", replace 
	

	**** combined sexism measures for appendix **** 
	
	
	eststo clear
	
	
eststo cc_happening2: logit gwhapp sexism_all  $controls   [pweight=V160101]
eststo cc_humancaused: logit human sexism_all  $controls  [pweight=V160101]
		
		# delimit ;
		esttab 	using a4_append_sexism_all.rtf, nogap se b(%9.3f) starlevels(* .05) pr2(%9.3f) ///
			title("ANES 2016: Combined measures sexism and Climate Change")
			 label nonumbers
			//addnote("Dependent variable")//
			compress replace;
		#delimit cr	
		
		
**** adding in racial resentment to controls **** 


			eststo clear
	
eststo cc_happening: logit gwhapp modernsexism resentment  $controls   [pweight=V160101]
eststo cc_humancaused: logit human modernsexism resentment   $controls  [pweight=V160101]
eststo cc_happening2: logit gwhapp hostilesexism resentment  $controls   [pweight=V160101]
eststo cc_humancaused2: logit human hostilesexism resentment   $controls  [pweight=V160101]
		
		# delimit ;
		esttab 	using a4_append_racism.rtf, nogap se b(%9.3f) starlevels(* .05) pr2(%9.3f) ///
			title("ANES 2016: Sexism, Racism, and Climate Change")
			 label nonumbers
			 mtitle("GW Happening" "Caused by Humans" "GW Happening" "Caused by Humans" )
			//addnote("Dependent variable")//
			compress replace;
		#delimit cr	

**** adding right wing authoritarism to controls 

eststo clear
	
eststo cc_happening: logit gwhapp modernsexism rwa  $controls   [pweight=V160101]
eststo cc_humancaused: logit human modernsexism rwa   $controls  [pweight=V160101]
eststo cc_happening2: logit gwhapp hostilesexism rwa  $controls   [pweight=V160101]
eststo cc_humancaused2: logit human hostilesexism rwa   $controls  [pweight=V160101]
		
		# delimit ;
		esttab 	using a4_append_rwa.rtf, nogap se b(%9.3f) starlevels(* .05) pr2(%9.3f) ///
			title("ANES 2016: Sexism, Right Wing Authoritarianism, and Climate Change")
			 label nonumbers
			 mtitle("GW Happening" "Caused by Humans" "GW Happening" "Caused by Humans" )
			//addnote("Dependent variable")//
			compress replace;
		#delimit cr	

		
***** ANES 2012 analysis and results ***** 
clear

use "ANES2012_cleaned.dta" 

global controls male Democrat Republican Liberal Conservative white income1 b1.educlevel b1.agecat

label var male "Male" 
label var Democrat "Democrat" 
label var Republican "Republican" 
label var Liberal "Liberal" 
label var Conservative "Conservative" 
label var white "Race: White" 
label var income1 "Income" 
label var modernsexism "Modern sexism" 

**** basic results ***** 

eststo clear
eststo cc_happening: logit gwhapp modernsexism $controls   [pweight=weight_full]
eststo cc_humancaused: logit human modernsexism $controls   [pweight=weight_full]

		# delimit ;
		esttab 	using 4_anes12.rtf, nogap se b(%9.3f) starlevels(* .05) pr2(%9.3f) 
			title("Sexism and Climate Change Attitudes (ANES 2012)")
			 label nonumbers
			addnote("ANES 2012; Logistic regression with survey weights")
			compress replace;
		#delimit cr
		

***** 2012 compared to 2016 ***** 

clear 

use "ANES_msi_combined.dta" 

label var Dem "Democrats"
label var Rep "Republican"
label var modernsexism "Modern sexism"

global controls Male Democrat Republican Liberal Conservative white income1 educlevel agecat

eststo clear 
logit gwhapp modernsexism Male Democrat Republican Liberal Conservative white income1 educlevel agecat [pweight=weight_full] if surveyyr==2012
eststo gw_cca2012: margins, dydx(modernsexism) atmeans post

logit human modernsexism Male Democrat Republican Liberal Conservative white income1 educlevel agecat [pweight=weight_full] if surveyyr==2012
eststo human_cca2012: margins, dydx(modernsexism)  atmeans post


logit gwhapp modernsexism Male Democrat Republican Liberal Conservative white income1 educlevel agecat [pweight=weight] if surveyyr==2016
eststo gw_cca2016: margins, dydx(modernsexism) atmeans post

logit human modernsexism Male Democrat Republican Liberal Conservative white income1 educlevel agecat [pweight=weight] if surveyyr==2016
eststo human_cca2016: margins, dydx(modernsexism) atmeans post


	coefplot  (gw_cca2012, label(Global Warming is Happening)) (human_cca2012, label(Caused by Humans)), bylabel (2012 ANES) ///
	|| (gw_cca2016) (human_cca2016), bylabel (2016 ANES) ///
	 drop(_cons Male Democrat Republican Liberal Conservative white2 income1 educlevel agecat5) ///
	format(%9.3f) ytitle("Substantive Effect of Modern Sexism" "on climate beliefs") yline(0, lpattern(dash) lcolor(gray) lwidth(vthin)) ///
	legend(size(small) rows(1)) scheme(s1mono) ysize(3) ///
	byopts(cols(2)) vertical grid(between) graphregion(margin(medlarge)) ///
	ylab(0 "0%" -.2 "-20%" -.4 "-40%" -.6 "-60%") ///
	xlab(none)
	graph save f4_2012_2016.gph, replace
	graph export f4_2012_2016.pdf, replace 
	
	
	
	eststo clear 
eststo gw_cca2012: logit gwhapp modernsexism Male Democrat Republican Liberal Conservative white income1 educlevel agecat [pweight=weight_full] if surveyyr==2012
 margins, dydx(modernsexism) atmeans post

eststo human_cca2012: logit human modernsexism Male Democrat Republican Liberal Conservative white income1 educlevel agecat [pweight=weight_full] if surveyyr==2012
margins, dydx(modernsexism)  atmeans post

eststo gw_cca2016: logit gwhapp modernsexism Male Democrat Republican Liberal Conservative white income1 educlevel agecat [pweight=weight] if surveyyr==2016
margins, dydx(modernsexism) atmeans post

eststo human_cca2016: logit human modernsexism Male Democrat Republican Liberal Conservative white income1 educlevel agecat [pweight=weight] if surveyyr==2016
margins, dydx(modernsexism) atmeans post

		# delimit ;
		esttab 	using a4_anes12_16.rtf.rtf, nogap se b(%9.3f) starlevels(* .05) pr2(%9.3f) 
			title("Sexism and Climate Change Attitudes (ANES 2012 & 2016)")
			 label nonumbers
			addnote("ANES 2012 and 2016; Logistic regression with survey weights")
			compress replace;
		#delimit cr

	
	
	***** post hoc tests to compare coefficient size ***** 
	
	
	
eststo clear 
logit gwhapp modernsexism $controls if surveyyr==2012
estimate store gw_cca2012
logit human modernsexism $controls if surveyyr==2012
estimate store human_cca2012

logit gwhapp modernsexism $controls if surveyyr==2016
estimate store gw_cca2016
logit human modernsexism $controls  if surveyyr==2016
estimate store human_cca2016

	suest gw_cca2012 gw_cca2016
	test [gw_cca2012_gwhappening]modernsexism=[gw_cca2016_gwhappening]modernsexism, accum		
	
	suest human_cca2012 human_cca2016
	test [human_cca2012_humanactivity ]modernsexism=[human_cca2016_humanactivity]modernsexism, accum	
	
	
eststo clear 
logit gwhapp complaining Male Democrat Republican Liberal Conservative white income1 educlevel agecat if surveyyr==2012
estimate store gw_cca2012
logit human complaining Male Democrat Republican Liberal Conservative white income1 educlevel agecat  if surveyyr==2012
estimate store human_cca2012

logit gwhapp complaining Male Democrat Republican Liberal Conservative white income1 educlevel agecat  if surveyyr==2016
estimate store gw_cca2016
logit human complaining Male Democrat Republican Liberal Conservative white income1 educlevel agecat  if surveyyr==2016
estimate store human_cca2016

	suest gw_cca2012 gw_cca2016
	test [gw_cca2012_gwhappening]complaining=[gw_cca2016_gwhappening]complaining, accum		
	
	suest human_cca2012 human_cca2016
	test [human_cca2012_humanactivity ]complaining=[human_cca2016_humanactivity]complaining, accum	
		
			
	****** CCES analysis **** 

clear 

 use "CCES_cleaned.dta" 

**** setting up global controls *** 

global demographics Male Dem Rep Lib Cons White income1 b1.educlevel b1.agecat5
// standard regs and interactions

set more off

eststo clear
eststo all2: reg cc_support hostile_sexism $demographics [pweight=vvweight]
eststo co2: logit CO2reg hostile_sexism $demographics [pweight=vvweight]
eststo renewables: logit RE hostile_sexism $demographics [pweight=vvweight]
eststo fuel: logit fuel_reverse hostile_sexism $demographics [pweight=vvweight]
eststo epa: logit EPAenforcement1 hostile_sexism $demographics [pweight=vvweight]
eststo paris: logit withdraw_paris hostile_sexism $demographics [pweight=vvweight]


		# delimit ;
		esttab 	using 2_cces.rtf, nogap se b(%9.3f) starlevels(* .05) r2(%9.3f) pr2(%9.3f) 
			title("Sexism and Climate Change Attitudes (CCES 2018)")
			 label nonumbers
			addnote("CCES 2018; Logistic regression with survey weights")
			compress replace;
		#delimit cr

****** producing graphs **** 
	
	**** PID ***** 
	
	eststo clear
	reg cc_support hostile_sexism $demographics if Democrat == 1 [pweight=vvweight]
	margins, at(hostile_sexism=(0(.125)1))   atmeans post 
	estimates store dem
	
	reg cc_support hostile_sexism $demographics if Republican == 1 [pweight=vvweight]
	margins, at(hostile_sexism=(0(.125)1))   atmeans post 
	estimates store rep
	
	
	coefplot (dem, label (Democrats)) (rep, label (Republicans)) ///
	||, ytitle ("% Supporting")   title("Support for Climate Policy") ///
	xlab(0 "Low" .5 "Medium" 1 "High" , labsize(vsmall)) xtitle ("Hostile sexism (CCES 2018)") ///
	ylab(.25 "25%" .5 "50%" .75 "75%" 1 "100%", labsize(vsmall)) ///
	at recast(line) lwidth(*2) ciopts(recast(rline) lc(gray) lp(-) lw(vthin)) ///
	legend (rows(1) pos(6))
	graph save "policy_pid_v2b.gph", replace
	graph export "policy_pid_v2b.pdf", replace 
	
	
	eststo clear
	eststo dem: reg cc_support hostile_sexism $demographics if Democrat == 1 [pweight=vvweight]
	eststo rep: reg cc_support hostile_sexism $demographics if Republican == 1 [pweight=vvweight]
	
	
	# delimit ;
		esttab 	using 3_cces_pid.rtf, nogap se b(%9.3f) starlevels(* .05) r2(%9.3f) ///
			title("CCES 2016: Party Identification, Sexism, and Climate Change")
			mtitle("Dems" "Reps") 
			 label nonumbers
			//addnote("Dependent variable")//
			compress replace;
		#delimit cr

	
	
	***** merging ANES and CCES figures on PID ****** 
	
	
	
	grc1leg "human_pid_hostile.gph" "policy_pid_v2b.gph", ///
	col(3) graphregion(margin(none)) ysize(3.5) 
	graph save f2_pid_combo_sep.gph, replace
	graph export f2_pid_combo_sep.pdf, replace 

